async function show_plugin(){
	const [tab] = await chrome.tabs.query({active:true, currentWindow:true});
	console.log("send show");
	chrome.tabs.sendMessage(tab.id,
		{
			action: 'pluginShowHide',
			text: 'show'
		});
}


async function hide_plugin(){
	const [tab] = await chrome.tabs.query({active:true, currentWindow:true});
	console.log("send hide");
	chrome.tabs.sendMessage(tab.id,
		{
			action: 'pluginShowHide',
			text: 'hide'
		});
}

async function action_stop(){
	const [tab] = await chrome.tabs.query({active:true, currentWindow:true});
	console.log("send hide");
	chrome.tabs.sendMessage(tab.id,
		{
			action: 'pluginActionStop'
		});
}

var show_bt = document.getElementById('show_plugin');
var hide_bt = document.getElementById('hide_plugin');
var stop_bt = document.getElementById('action_stop');
var main_ui = document.getElementById('main_ui');

main_ui.style = "width:100px";

show_bt.addEventListener("click", (event)=>{
		show_plugin();
	});

hide_bt.addEventListener("click", (event)=>{
		hide_plugin();
	});

stop_bt.addEventListener("click", (event)=>{
		action_stop();
	});


